<?php

namespace Database\Seeders;

use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Str;

class ArticleSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        $data = [];
        for($i=1;$i<=100;$i++){
            $data[] =['title' => Str::random(4),'content' =>Str::random(8),'user_id'=>2];
        }
        DB::table('article')->insert($data);
    }
}
